    <!------------------- Only admin can have those actions ------------------->

    <?php if ($current_customer['group_id'] == '1'): ?>
        <div class="admin_left actions">
            <h3 style="font-size:20px;">Manage more</h3>
            <ul>

                <li style="list-style-type:none; margin-bottom:20%;"><?php echo $this->Html->link(__('List Customers'), array('action' => 'index'),array('class' => 'consistentButton')); ?></li>
                
            </ul>
        </div>
    <?php endif; ?>



    <div class=" admin_right customers form">

            <div id="breadcrumbAdmin" class = "breadcrumb">
                <?php if ($current_customer['group_id'] == '1'): ?>
                    <?php $this->Html->addCrumb('Add customer', '/Customers/add', array('style'=> ('text-decoration:underline; color:#EB1E70;'))); ?>
                    <?php echo $this->Html->getCrumbs(' > ', array( 'text' => 'Customers', 'url' => array('controller' => 'customers', 'action' => 'index'), 'escape' => false)); ?>
                <?php else: ?>
                    <?php $this->Html->addCrumb('Register', '/Customers/add', array('style'=> ('text-decoration:underline; color:#EB1E70;'))); ?>
                    <?php echo $this->Html->getCrumbs(' > ', array( 'text' => 'Home', 'url' => array('controller' => 'Pages', 'action' => 'pagehome'), 'escape' => false)); ?>
                <?php endif; ?>
            </div>


            <?php echo $this->Form->create('Customer', array('type' => 'POST')); ?>

            <div id="registerIcon">
                <h2 style="color: #e985b2; margin-left:2.5%; margin-top:2%;"><?php echo $this->Html->image('2pinkbook.png', array('alt' => 'Pink book')); ?><?php echo __('Register'); ?></h2>
            </div>




            <form>

                <p style="position:relative; left:182px; color:#F082A6;">All fields marked with * are required</p>
                <fieldset class="form1">


                    <legend><?php echo __('Contact Detail'); ?></legend>
                    <?php echo $this->Form->input('first_name', array('label' => 'First name', 'error' => array('attributes' => array('class' => 'myError') )  )); ?>

		            <?php echo $this->Form->input('last_name', array('label' => 'Last name', 'error' => array('attributes' => array('color' => 'red') )  )); ?>

                    <?php echo $this->Form->input('dob', array('label' => 'Date of birth','dateFormat' => 'DMY','minYear' => date('Y') - 90,'maxYear' => date('Y') + 0,'style'=> ('width:90px; height:30px;')));?>
                    <!--<?php echo $this->Form->input('dob', array('label' => 'Date of birth', 'type' => 'text' ,'id' => 'dob'));?>-->
                    <!--'dateFormat' => 'DMY','minYear' => date('Y') - 100,'maxYear' => date('Y') + 1,'style'=> ('width:90px; height:30px;')-->

                    <?php echo $this->Form->input('gender_id', array('label' => 'Gender'));?>

                    <?php echo $this->Form->input('phone', array('label' => 'Phone number'));?>

                    <?php echo $this->Form->input('email', array('label' => 'Email address', 'style'=> ('width:300px; height:21px;')));?>
			<?php echo $this->Form->hidden('customerlink',array('value'=> Configure::read('constantVar.siteurl')."/customers/activate/"));?>
                </fieldset>



                <fieldset class="form2">
                    <legend><?php echo __('Delivery address'); ?></legend>

                    <?php
                    echo $this->Form->input('street', array(
                                'label' => 'Street',
                    ));
                    echo $this->Form->input('suburb', array(
                                'label' => 'Suburb'
                    ));
                    echo $this->Form->input('city', array(
                                'label' => 'City'
                    ));
                    echo $this->Form->input('state', array(
                                'label' => 'State',
                    ));
                    echo $this->Form->input('postcode', array(
                                'label' => 'Postal Code',
                    ));
                    echo $this->Form->input('country', array(
                                'label' => 'Country',
                    ));
                    ?>
                </fieldset>



                <fieldset class="form3" >
                    <legend><?php echo __('Your account'); ?></legend>

                    <?php
                        echo $this->Form->input('username', array(
                                    'label' => 'Username','error' => array('attributes' => array('color' => 'red') )
                        ));

                        echo $this->Form->input('password', array(
                                    'label' => 'Password',
                        ));

                        echo $this->Form->input('confirm_password', array('label' => 'Confirm password',  'type'=>'password',
                        'error' => array('attributes' => array('class' => 'field_error'))
                        ));

                        echo $this->Form->input('group_id', array(
                                    'label' => 'User group',
									'type' => 'hidden',
									'default' => '2',
                        ));
                    ?>

                    <?php if ($current_customer['group_id'] != '1'): ?>
                        <?php
                            echo $this->Html->image($this->Html->url(array('controller'=>'customers', 'action'=>'captcha'), true),array('style'=>'','vspace'=>2));
                            echo '<p><a href="#" id="a-reload">Can\'t read? Reload</a></p>';
                            echo '<p>Enter security code shown above:</p>';
                            echo $this->Form->input('Customer.captcha',array('autocomplete'=>'off','label'=>false,'class'=>''));
                        ?>
                    <?php endif; ?>

                    <p style="margin-bottom:2%;"><?php echo $this->Form->end(__('Submit')); ?></p>
                </fieldset>
            </form>
    </div>





    <!------------------- Script to reload captcha ---------------------------->
    <script>
    $('#a-reload').click(function() {
        var $captcha = $("#img-captcha");
            $captcha.attr('src', $captcha.attr('src')+'?'+Math.random());
        return false;
    });
    </script>


    <script src="http://code.jquery.com/jquery-1.10.1.min.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
    <script src="../webroot/timepicker/jquery-ui-timepicker-addon.js" type="text/javascript"></script>
    <script src="../webroot/timepicker/jquery-ui-sliderAccess.js" type="text/javascript"></script>
    <link href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" type="text/css" media="all" rel="stylesheet">
    <link href="../css/jquery-ui-timepicker-addon.css" type="text/css" media="all" rel="stylesheet">


        <script>
            var today = new Date();
            today.setDate(today.getDate());

            $(function() {
                $('#dob').datetimepicker({
                    addSliderAccess: true, //add time picker
                    dateFormat: 'yy/mm/dd',
                    showOn: "both",
                    buttonImage: "../img/calendar_icon.png",
                    buttonImageOnly: true, //use icon trigger
                    hourMin: 8, // min 8:00
                    hourMax: 18, //  max hour 16:00
                    minDate: today, //minimum date is today
                    sliderAccessArgs: {
                        touchonly: false
                    }
                });
            });

        </script>